import { Component } from 'react';
class HorderFunc extends Component {
  state = {};
  sum(a) {
    return function (b) {
      return function (c) {
        return a + b + c;
      };
    };
  }
  render() {
    return (
      <div>
        <h1>高阶函数</h1>
        {this.sum(1)(2)(3)}
      </div>
    );
  }
}

export default HorderFunc;
